package com.zhika.zishi.fragments.set;

import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.zhika.zishi.R;
import com.zhika.zishi.customview.TitleView;
import com.zhika.zishi.interfaces.TitleInterface;

/**
 * Created by shi-02 on 2015/4/18.
 * 关于我们的Activity
 */
public class AboutUsFragment extends Fragment {

    private TitleView titleView;

    private View view;

    private Context context;

    public interface OnAboutUsInterface{
        public void remoteAboutUsFragment();
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.about_us_layout,container,false);

        initView();

        return view;
    }

    private void initView(){
        context = getActivity();

        titleView = (TitleView) view.findViewById(R.id.about_us_title_view);
        titleView.setLeftButtonText("返回");
        titleView.setMiddleRowText("关于我们");
        titleView.hideRightButton();
        titleView.setTitleViewInterface(new TitleInterface() {
            @Override
            public void leftTitleListener() {
                ((OnAboutUsInterface)context).remoteAboutUsFragment();
            }

            @Override
            public void middleTitleListener() {

            }

            @Override
            public void rightTitleListener() {

            }
        });
    }
}
